import request from '@/utils/request'

// 获取所有用户
export function getUserList() {
  return request({
    url: '/api/admin/user/list',
    method: 'get'
  })
}

// 新增用户
export function addUser(data) {
  return request({
    url: '/api/admin/user/add',
    method: 'post',
    data
  })
}

// 更新用户
export function updateUser(data) {
  return request({
    url: '/api/admin/user/update',
    method: 'post',
    data
  })
}

// 删除用户
export function deleteUser(id) {
  return request({
    url: `/api/admin/user/delete/${id}`,
    method: 'delete'
  })
} 